package cn.ucai.day01_Object.pa5_JavaBean;

/*
 * Java完全封装(JavaBean)
1.属性全部私有
2.提供统一的访问方式setter getter
3.提供无参和全参构造
4.实现序列化接口
 */

public class Person {
	private String name;
	private int age;
	//Dog dog;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public int getAge() {
		return age;
	}
	public void setAge(int age) {
		this.age = age;
	}
	public Person(){
		
	}
	public Person(String name,int age){
		this.name=name;
		this.age=age;
	}
	public void desc() {
		System.out.println(name+":"+age);
	}

}
